import { dataQueryAxios } from '@/utils/request'
import { downloadBlobFile } from '@hs-admin/api'

// 列表
export const getSuggestionList = (params: any): Promise<any> => {
  return dataQueryAxios({
    url: `/api/data-query/v1/suggestions`,
    method: 'get',
    params
  })
}

// 导出
export const exportSuggestion = (params: any): Promise<any> => {
  return dataQueryAxios({
    url: `/api/data-query/v1/suggestions:export`,
    method: 'get',
    params,
    responseType: 'blob'
  }).then((res: any) => {
    downloadBlobFile(res, res.name)
  })
}
